#It's only used at build time for source generation. We still install it in a
#"system" dir if one day we need a "permanent" SDK.

pkg_name=Python
version=3.4.2
build_dir=$builds_dir_root/$pkg_name-$version
src_dir=$src_dir_root/$pkg_name-$version
url=https://www.python.org/ftp/python/$version/$pkg_name-$version.tar.xz

cd "$src_dir_root"
rm -Rf "$pkg_name-$version"
tar Jxf "$pkg_name-$version.tar.xz"

rm -Rf "$build_dir"
mkdir -p "$build_dir"
cd "$build_dir"

export CFLAGS=-O0
"$src_dir/configure"				\
	--prefix=/libexec/libepoxy-python	\
	--disable-shared			\
	--disable-ipv6				\
	--without-system-expat			\
	--without-system-ffi			\
	--without-system-libmpdec		\
	--with-universal-archs=64-bit
unset CFLAGS

make

install_tmp_dir=/tmp/$pkg_name-$version
rm -Rf "$install_tmp_dir"
mkdir -p "$install_tmp_dir"
make install "DESTDIR=$install_tmp_dir"

install_dirs "$builders_dir_root/libepoxy/tmp.kludge0.dirs"
install_files "$builders_dir_root/libepoxy/tmp.kludge0.files" "$install_tmp_dir"
install_links "$builders_dir_root/libepoxy/tmp.kludge0.links"
elf_strip "$builders_dir_root/libepoxy/tmp.kludge0.elf-strip"

rm -Rf "$install_tmp_dir"
rm -Rf "$build_dir"
rm -Rf "$src_dir"
